package main

import (
	"fmt"
	"reflect"
)

type user struct {
	name string
}

func main() {
	str := user{name:"aaa"}
	strType := reflect.TypeOf(str)
	fmt.Println(strType.String())		// 输出：main.user
	change(str)
	//switch strType.(type) {
	//case :
	//	fmt.Println("yes")			// 输出：yes
	//}
}

func change(a interface{})  {
	r := a.(user)
	fmt.Println(r)	// 输出 {aaa}
}